From f6b49f5cf6138cb4523c57bbd0f1795aebdf80a3 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 6 Nov 2014 11:32:39 +0000 Subject: [PATCH] Apply SELinux labels to directories created by initscripts. Patch from Russell Coker. (Closes: #764912) (cherry picked from commit 46a8d71bec748f3c6dfb98bf4ba3973a5b3cd951) Conflicts: debian/changelog --- debian/changelog | 2 ++ debian/xen-utils-common.xen.init | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index e7b0a1b30a..9d0a912005 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,8 @@ xen (4.8.0-1~) unstable; urgency=high Incorporate a timeout so as not to block boot (Mitigates #737613) * Correct syntax error in xen-init-list when running with xend (Closes: #763102) + * Apply SELinux labels to directories created by initscripts. Patch from + Russell Coker. (Closes: #764912) [ Lubomir Host ] * Fix xen-init-name to not fail looking for a nonexistent 'config' diff --git a/debian/xen-utils-common.xen.init b/debian/xen-utils-common.xen.init index 1342a7d5d5..018c934405 100644 --- a/debian/xen-utils-common.xen.init +++ b/debian/xen-utils-common.xen.init @@ -69,6 +69,7 @@ env_setup() [ -d /run/xen ] && return 0 mkdir -m 700 /run/xen + [ -x /sbin/restorecon ] && /sbin/restorecon /run/xen } xend_start() @@ -247,6 +248,7 @@ xenstored_start() start-stop-daemon --start --quiet --pidfile "$XENSTORED_PIDFILE" --exec "$XENSTORED" --test > /dev/null \ || return 1 [ -d "$XENSTORED_DIR" ] || mkdir -p "$XENSTORED_DIR" + [ -x /sbin/restorecon ] && /sbin/restorecon "$XENSTORED_DIR" export XENSTORED_ROOTDIR="$XENSTORED_DIR" start-stop-daemon --start --quiet --pidfile "$XENSTORED_PIDFILE" --exec "$XENSTORED" -- \ $XENSTORED_ARGS --pid-file="$XENSTORED_PIDFILE" \ -- 2.30.2